<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>&lt;arpa/inet.h&gt;</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4>NAME</h4><blockquote>
arpa/inet.h - definitions for internet operations
</blockquote><h4>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;arpa/inet.h&gt;
</code>
</pre>
</blockquote><h4>DESCRIPTION</h4><blockquote>
The &lt;<B>arpa/inet.h</B>&gt; header makes available the type <B>in_port_t</B>
and the type <B>in_addr_t</B> as defined in the description of
<i><a href="netinetin.h.html">&lt;netinet/in.h&gt;</a></i>.
<p>
The &lt;<B>arpa/inet.h</B>&gt; header makes available the <B>in_addr</B> structure,
as defined in the description of 
<i><a href="netinetin.h.html">&lt;netinet/in.h&gt;</a></i>.
<p>
The following may be declared as functions, or defined as macros, or both:
<p>
<pre>
<code>
uint32_t htonl(uint32_t hostlong);
uint16_t htons(uint16_t hostshort);
uint32_t ntohl(uint32_t netlong);
uint16_t ntohs(uint16_t netshort);
</code>
</pre>
<p>
The 
<B>uint32_t</B>
and 
<B>uint16_t</B>
types are made available by inclusion of
<i><a href="../xsh/inttypes.h.html">&lt;inttypes.h&gt;</a></i>
(see referenced document
<B>XSH</B>).
<p>
The following are declared as functions, and may also be defined as macros:
<pre>
<code>
in_addr_t      <a href="inet_addr.html">inet_addr</a>(const char *<I>cp</I>);
in_addr_t      <a href="inet_lnaof.html">inet_lnaof</a>(struct in_addr <I>in</I>);
struct in_addr <a href="inet_makeaddr.html">inet_makeaddr</a>(in_addr_t <I>net</I>, in_addr_t <I>lna</I>);
in_addr_t      <a href="inet_netof.html">inet_netof</a>(struct in_addr <I>in</I>);
in_addr_t      <a href="inet_network.html">inet_network</a>(const char *<I>cp</I>);
char          *<a href="inet_ntoa.html">inet_ntoa</a>(struct in_addr <I>in</I>);
</code>
</pre>
Inclusion of the
<i><a href="arpainet.h.html">&lt;arpa/inet.h&gt;</a></i>
header may also make visible all symbols from
<i><a href="netinetin.h.html">&lt;netinet/in.h&gt;</a></i>
and
<i><a href="../xsh/inttypes.h.html">&lt;inttypes.h&gt;</a></i>.
</blockquote><h4>SEE ALSO</h4><blockquote>
<i><a href="htonl.html">htonl()</a></i>,
<i><a href="inet_addr.html">inet_addr()</a></i>,
<i><a href="netinetin.h.html">&lt;netinet/in.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
